<html>
<head>
    <meta charset="utf-8">
    <#assign base=request.contextPath  />
    <#setting  number_format="0.##"/>
    <title>销售管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${base}/backstage/layui/css/layui.css" media="all">
    <script src="${base}/backstage/js/jquery-1.8.3.min.js"></script>
    <script src="${base}/backstage/layui/layui.js"></script>
    <script src="${base}/backstage/js/feng.js"></script>
    <script>
        var base =  "${base}";
    </script>
    <script src="${base}/backstage/js/ipNameUrl.js"></script>
    <style>
        /*给数据表格加高*/
        .layui-table-cell{
            height:50%;
        }
    </style>
</head>
<body>
<br>
<div class="demoTable" style="margin-left: 15px;">
    <form class="layui-form " action="">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label>姓名</label>
                <div class="layui-inline">
                    <input class="layui-input" name="money" id="name" placeholder="请输入姓名" autocomplete="off">
                </div>
            </div>
            <div class="layui-inline">
                <label>手机号</label>
                <div class="layui-inline">
                    <input class="layui-input" name="money" id="phone" placeholder="请输入手机号" autocomplete="off">
                </div>
            </div>
            <div class="layui-inline">
                <label>身份证号</label>
                <div class="layui-inline">
                    <input class="layui-input" name="money" id="idNumber" placeholder="请输入身份证号" autocomplete="off">
                </div>
            </div>
<#--            <div class="layui-inline">-->
<#--                <label class="layui-form-label">类型</label>-->
<#--                <div class="layui-input-inline">-->
<#--                    <select name="modules" id="commodityId" lay-verify="required" lay-search="">-->
<#--                        <option value="">直接选择类型</option>-->
<#--                        <option value="1">商家</option>-->
<#--                        <option value="2">销售</option>-->
<#--                    </select>-->
<#--                </div>-->
<#--            </div>-->



            <button class="layui-btn" onclick="sech()" data-method="offset"
                    type="button">查询
            </button>
        </div>
    </form>
</div>
<table class="layui-hide" id="test" lay-filter="test"></table>

<#--<script type="text/html" id="toolbarDemo">-->
<#--    <form class="layui-form " action="">-->
<#--        <div class="layui-form-item" style="margin-left: 15px;">-->
<#--            <div class="layui-btn-group">-->
<#--                <button class="layui-btn" id="btn2" data-method="offset" type="button">添加</button>-->
<#--            </div>-->
<#--        </div>-->
<#--    </form>-->
<#--</script>-->
<script>
    layui.use(['table', 'form', 'layedit', 'laydate'], function () {
        var form = layui.form
            , $ = layui.jquery
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate
            , table = layui.table;

        var whereData = {}
        whereData.name = $("#name").val();
        whereData.phone = $("#phone").val();
        whereData.idNumber = $("#idNumber").val();

        table.render({
            skin: 'line' //行边框风格
            , even: true //开启隔行背景
            , elem: '#test'
            , whereData: whereData
            , url: '${base}/admin/sale/selectMyPage'
            , toolbar: '#toolbarDemo'
            ,cols:[[
                {field:'id', title: '序号',templet:function(val){
                        return val.LAY_INDEX
                    },align:'center'},
                {field:'name', title: '姓名', align:'center'},
                {field:'phone', title: '手机号', align:'center'},
                {field:'idNumber', title: '身份证号', align:'center'},
                {field:'money', title: '入驻费', align:'center'},
                {field:'address', title: '地址', align:'center'},
                {field:'nickName', title: '昵称', align:'center'},
                {field:'userUrl', title: '头像',templet:function(val){
                        return "<img src="+val.userUrl+">";
                    },  align:'center'},
                {field:'positive', title: '身份证正',templet:function(val){
                        return "<img src="+val.positive+">";
                    },  align:'center'},
                {field:'side', title: '身份证反',templet:function(val){
                        return "<img src="+val.side+">";
                    },  align:'center'},
                {field:'createTime', title: '创建时间',templet:function(val){
                        if(val.createTime==undefined){
                            return "";
                        }
                        return changeDateFormat(val.createTime);
                    },  align:'center'}
                // {field: 'right', title: '操作', toolbar: '#barDemo', align: 'center'}
            ]]
            , id: 'testReload'
            , page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                , theme: '#1AB394'
                , limit: 10
            }
        });
    })
    //搜索
    function sech() {
        var whereData = {}
        whereData.name = $("#name").val();
        whereData.phone = $("#phone").val();
        whereData.idNumber = $("#idNumber").val();
        //表刷新方法
        var table = layui.table;
        table.reload('testReload', {
            url: '${base}/admin/sale/selectMyPage'
            , where: whereData
        });
    }

</script>

</body>

</html>


